
#ifndef IEQUATABLE_T_H_2
#define IEQUATABLE_T_H_2

// Riccsson includes.
#include "System/Object.h"

// using System.Runtime.InteropServices;

namespace Riccsson
{
	namespace System
	{
		namespace Generic
		{
			// Summary:
			//     Defines a generalized method that a value type or class implements to create
			//     a type-specific method for determining equality of instances.
			//
			// Type parameters:
			//   Object:
			//     The type of objects to compare.
			template<typename T> interface IEquatable
			{
				// Summary:
				//     Indicates whether the current object is equal to another object of the same
				//     type.
				//
				// Parameters:
				//   T:
				//     An object to compare with this object.
				//
				// Returns:
				//     true if the current object is equal to the other parameter; otherwise, false.
				public: virtual bool Equals(T* other) = 0;

				public: bool Equals(T* other) const
				{
					return const_cast<IEquatable<T>*>(this)->Equals(other);
				}
			};
		}
	}
}

#endif // IEQUATABLE_T_H